<c:if test="#{widget.mode != 'after_view' and widget.mode != 'tab_content'}"
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:c="http://java.sun.com/jstl/core"
  xmlns:nxu="http://nuxeo.org/nxweb/util"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:nxd="http://nuxeo.org/nxweb/document"
  xmlns:h="http://java.sun.com/jsf/html">

  <nxd:restDocumentLink document="#{mainTabsActions.getDocumentFor(widgetProperty_actionId)}"
    rendered="#{widgetProperty_enabled or widgetProperty_disableFiltered}"
    repositoryName="#{navigationContext.currentServerLocation.name}"
    view="#{mainTabsActions.getViewFor(widgetProperty_action)}"
    pattern="#{mainTabsActions.getPatternFor(widgetProperty_action)}"
    addTabInfo="false"
    disabled="#{!widgetProperty_available}"
    target="#{widgetProperty_target}"
    tabs="MAIN_TABS:#{widgetProperty_actionId}"
    onclick="#{widgetProperty_onclick}"
    accesskey="#{widgetProperty_accessKey}">
    <h:outputText value="#{messages[widget.label]}" />
  </nxd:restDocumentLink>

</c:if>